package com.ykq.controller;

import com.ykq.service.DeptSerivce;
import com.ykq.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @program: 145ssm
 * @description:
 * @author: 闫克起2
 * @create: 2021-12-13 09:18
 **/
@Controller
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private DeptSerivce deptSerivce;

    @RequestMapping("getAllDept")
    @ResponseBody
    public CommonResult getAllDept(){
        CommonResult commonResult=deptSerivce.findAllDept();
        return commonResult;
    }
}
